package com.lamp.map;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Paint.Style;
import android.util.AttributeSet;
import android.widget.LinearLayout;

public class myinfo extends LinearLayout{
	private Paint borderPaint;
	public myinfo(Context context , AttributeSet attr){
		super(context , attr);
		init();
	}
	public myinfo(Context context) {
		super(context);
		init();
		// TODO Auto-generated constructor stub
	}
	private void init(){
		borderPaint = new Paint();
		borderPaint.setAntiAlias(true);
		borderPaint.setStyle(Style.STROKE);
		borderPaint.setStrokeWidth(2);
		borderPaint.setARGB(225, 75, 75, 75); //grey

	}
	@Override
    protected void dispatchDraw(Canvas canvas) {
    	
    	RectF drawRect = new RectF();
    	
    	drawRect.set(0,0, getMeasuredWidth(), getMeasuredHeight());
		canvas.drawRoundRect(drawRect, 8, 8, borderPaint);
		canvas.drawLine(0, getMeasuredHeight()/2 , getMeasuredWidth(),getMeasuredHeight()/2, borderPaint);
		super.dispatchDraw(canvas);
    }
}
